package jk.fox.exchange;

import jk.fox.exchange.client.ClientExchange;
import jk.fox.exchange.server.ServerExchange;
import jk.fox.exchange.server.handler.ExchangeHandler;
import jk.fox.transport.ClientTransporter;
import jk.fox.transport.ServerTransporter;

/**
 * @author cuichao
 * @Description: Exchange
 * @Date: create in 2020/5/23 23:47
 */
public interface Exchange {
    /**
     * node
     * @param transporter
     * @return
     */
    ClientExchange client(ClientTransporter transporter);

    /**
     * server
     * @param transporter
     * @param exchangeHandler
     * @return
     */
    ServerExchange server(ServerTransporter transporter, ExchangeHandler exchangeHandler);
}
